package br.imr.support;

import javax.faces.event.ValueChangeEvent;


public class ConsultarEvent {
	
	private Character escolha;
	private String focus;
	
	
	/**
	 * Metodo que verifica o radio e habilita o input - tipo char
	 */
	public ValueChangeEvent verificaRadioInputChar(ValueChangeEvent event){
		
		setEscolha((Character)event.getNewValue());
		verificaFocus();
		return event;		
	}

	private void verificaFocus(){
		switch(this.escolha){
			case '1':
				this.focus = new String("nome");
				break;
			case '2':
				this.focus = new String("dataAniversario");
				break;
			case '3':
				this.focus = new String("ministerio");	
				break;
		}	
	}

	public Character getEscolha() {
		return escolha;
	}

	public void setEscolha(Character escolha) {
		this.escolha = escolha;
	}

	public String getFocus() {
		return focus;
	}

	public void setFocus(String focus) {
		this.focus = focus;
	}
	
	
	
}
